﻿using AutoMapper;
using B.S.GridManage.Api.Write.Application.Command.DutyGrid;
using B.S.GridManage.Api.Write.Application.Command.GridTeam;
using B.S.GridManage.Api.Write.Application.Command.LogicalGrid;
using B.S.GridManage.Api.Write.Application.Command.PhsicalGrid;
using B.S.GridManage.Domain.Entities;

namespace B.S.GridManage.Api.Write
{

    /// <summary>
    /// automaper 映射文件
    /// </summary>
    public class MyMapper:Profile
    {
        public MyMapper()
        {
            CreateMap<CreatePhysicalGridCommand, PhysicallGridModel>().ReverseMap();
            CreateMap<UpdatePhysicalGridCommand, PhysicallGridModel>().ReverseMap();
            CreateMap<UpdateLogicalGridCommand, LogicalGridModel>().ReverseMap();
            CreateMap<CreateLogicalGridCommand, LogicalGridModel>().ReverseMap();
            CreateMap<CreateDutyCommand, DutyGridModel>().ReverseMap();//CreateDutyCommand -> DutyGridModel
            CreateMap<UpdateDutyCommand, DutyGridModel>().ReverseMap();//UpdateDutyCommand -> DutyGridModel
            CreateMap<GridTeamModel, AddGridTeamCommand>().ReverseMap(); 
        }
    }
}
